Skip to content

ci: unified workflow (lint + typecheck + build + rust)#100

Open
kyscott18 wants to merge 8 commits into
smooth-transaction-volume-chartfrom
ci/unified-frontend-workflow
Open

ci: unified workflow (lint + typecheck + build + rust)#100
kyscott18 wants to merge 8 commits into
smooth-transaction-volume-chartfrom
ci/unified-frontend-workflow

Conversation

@kyscott18

@kyscott18 kyscott18 commented Jun 9, 2026

Copy link
Copy Markdown

Replaces .github/workflows/lint.yml with a unified .github/workflows/ci.yml running four jobs:

  • lint — Biome 2.1.2 (biome ci)
  • typechecktsc --noEmit (frontend)
  • buildnext build (frontend)
  • rustcargo fmt --check, cargo clippy -D warnings, cargo build (backend workspace)

Notes:

  • lint.yml is removed; its Biome job is rolled into ci.yml.
  • The existing publish-backend.yml (Docker image publish) is unchanged — this adds build/lint CI for Rust, not publishing.
  • The rust job runs in the rust:1.91-slim container (matching the backend Dockerfile) so bindgen's libclang is new enough for the upstream C23 headers from monad-bft. Cargo build is cached via Swatinem/rust-cache.
  • All jobs are workflow_dispatch-able from the Actions tab (also run on pull_request and pushes to main).

Also adds a typecheck script (tsc --noEmit) to frontend/package.json.

⚠️ Known-red check: rust (clippy)

cargo fmt --check and cargo build pass. cargo clippy -D warnings currently fails on 8 pre-existing lint issues in backend/ (this code was never clippy-checked — publish-backend.yml only builds). We are keeping strict -D warnings and fixing those findings in a separate follow-up PR; the rust check here is expected red until then. Findings: large_enum_variant, needless_return, match_like_matches_macro, should_implement_trait (from_str), ptr_arg, clone_on_copy, manual_is_multiple_of, needless_borrow.

Follow-ups (separate PRs)

  1. Fix the 8 backend clippy findings so the rust job goes green.
  2. Unify the two pnpm projects (root + frontend/) into a single root pnpm workspace with root orchestration scripts — deferred because it needs coordinated Vercel deploy-settings changes.

Stacked on #99 for the pnpm lockfile fix; rebase base back to main once #99 merges.

dak-agent Bot and others added 5 commits June 8, 2026 20:48
Switch the TPS Area interpolation from `linear` to `monotone` so the
Transaction volume chart renders as a smooth curve instead of connected
straight segments between data points.
Revert line interpolation to linear and enable Recharts' built-in
animation so newly arriving data points ease into the chart instead
of snapping in. This is the smoothing that was actually requested:
the visible motion of new points appearing, not the line shape.
Switch the X axis to a continuous time scale with a [now - 5min, now]
domain advanced each animation frame, so new points slide in smoothly
from the right edge instead of popping into discrete category slots.
Keeps isAnimationActive disabled to avoid Recharts re-animation loops on
each TPS event. Clamp the domain's left edge to the oldest point so the
chart fills immediately instead of showing an empty 5-minute lead-in.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replaces frontend/pnpm-lock.yaml with main's lockfile minus the duplicate
keys introduced by PR #97 (so pnpm 10 can parse it). No package versions
change vs main; pnpm install --frozen-lockfile passes.

The previous commit on this branch ran a non-frozen pnpm install, which
silently re-resolved every floating semver in package.json and produced
~2000 lines of incidental lockfile churn. This commit reverses that.
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
monode Ready Ready Preview, Comment Jun 9, 2026 2:08pm

Request Review

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown

Greptile Summary

This PR consolidates three separate CI concerns — Biome linting, TypeScript typechecking, and Next.js building — along with a new Rust check job into a single .github/workflows/ci.yml, replacing the old lint.yml file.

  • lint: Identical Biome check (v2.1.2) from the removed lint.yml, now also triggered on push to main and via workflow_dispatch.
  • typecheck / build: Two new frontend jobs using pnpm 10 + Node 22, gated by a new \"typecheck\": \"tsc --noEmit\" script in frontend/package.json.
  • rust: New four-step Rust job (fmt check, clippy with -D warnings, full build) running inside a rust:1.91-slim container with the necessary native libraries pre-installed.

Confidence Score: 4/5

Safe to merge; the two open questions (missing env vars for next build, duplicated install steps) were flagged in prior review rounds and are the author's call to resolve.

The workflow structure is sound: the Rust job correctly installs native build deps before checkout, operates at the workspace root where Cargo.toml lives, and the biome/typecheck/build jobs mirror established patterns. The outstanding concerns — the build job potentially throwing on missing NEXT_PUBLIC_EVENTS_WS_URL and the duplicated pnpm/node install steps between typecheck and build — were raised in previous review threads.

.github/workflows/ci.yml — specifically the build job's env var handling and the shared setup duplication between typecheck and build.

Important Files Changed

Filename Overview
.github/workflows/ci.yml New unified CI file with four jobs (lint, typecheck, build, rust); duplicate install steps between typecheck and build are a maintenance concern (already flagged), and build may fail on missing env vars (already flagged); the rust job is correctly structured at the workspace root with build deps installed before checkout.
.github/workflows/lint.yml Deleted; its Biome lint job is carried forward unchanged in ci.yml.
frontend/package.json Adds the typecheck script (tsc --noEmit) required by the new CI job; no other changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    trigger["Trigger\n(pull_request / push main / workflow_dispatch)"]
    trigger --> lint
    trigger --> typecheck
    trigger --> build
    trigger --> rust

    lint["lint\nubuntu-latest\nBiome 2.1.2 ci"]

    subgraph frontend_jobs ["Frontend Jobs (pnpm 10, Node 22)"]
        typecheck["typecheck\npnpm typecheck\n(tsc --noEmit)"]
        build["build\npnpm build\n(next build)"]
    end

    subgraph rust_job ["Rust Job (rust:1.91-slim container)"]
        r1["Install native deps"]
        r2["actions/checkout@v4"]
        r3["rustup add rustfmt + clippy"]
        r4["Swatinem/rust-cache@v2"]
        r5["cargo fmt --all --check"]
        r6["cargo clippy --all-targets --all-features -D warnings"]
        r7["cargo build --all-targets"]
        r1 --> r2 --> r3 --> r4 --> r5 --> r6 --> r7
    end

    rust --> rust_job
Loading

Reviews (4): Last reviewed commit: "ci: run rust job in rust:1.91-slim conta..." | Re-trigger Greptile

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment on lines +43 to +57
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: frontend/pnpm-lock.yaml
- run: pnpm install --frozen-lockfile

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 next build runs without required env vars

frontend/config/env.ts exposes NEXT_PUBLIC_EVENTS_WS_URL via getEnvOrThrow, which throws if the variable is unset. While the getter is lazy and won't fire during the webpack compile pass itself, any page that calls publicEnv.EVENTS_WS_URL during server-side rendering or static generation will cause next build to throw and fail the job. Consider adding an env: block (using GitHub Actions secrets) or providing dummy values so the build job gives reliable signal rather than potentially failing for a config reason instead of a code reason.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 43-57

Comment:
**`next build` runs without required env vars**

`frontend/config/env.ts` exposes `NEXT_PUBLIC_EVENTS_WS_URL` via `getEnvOrThrow`, which throws if the variable is unset. While the getter is lazy and won't fire during the webpack compile pass itself, any page that calls `publicEnv.EVENTS_WS_URL` during server-side rendering or static generation will cause `next build` to throw and fail the job. Consider adding an `env:` block (using GitHub Actions secrets) or providing dummy values so the build job gives reliable signal rather than potentially failing for a config reason instead of a code reason.

How can I resolve this? If you propose a fix, please make it concise.

@kyscott18 kyscott18 force-pushed the ci/unified-frontend-workflow branch from 90e1aac to 75e5e79 Compare June 9, 2026 13:58
@kyscott18 kyscott18 changed the base branch from main to smooth-transaction-volume-chart June 9, 2026 13:59
@kyscott18 kyscott18 changed the title ci: unified frontend workflow (lint + typecheck + build) ci: unified workflow (lint + typecheck + build + rust) Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants